DeathwatchGuides_ScrollSelectGuide = {}
function print(txt)
	ChatWindow.Print(towstring(txt))
end
function DeathwatchGuides_ScrollSelectGuide.Initialize()
	-- HEADER
	LabelSetText( "DeathwatchGuides_ScrollSelectGuideTitleBarText", L"Deathwatch Guides" )
	LabelSetText( "DeathwatchGuides_ScrollSelectGuideHeaderText", L"Select Guides :" )

	 --SETTING UI
	guide = V["GUIDE_AMOUNT"]
	chkGuide = {}
	count =0
	for i=1,guide do
		checkGuide = V["CHAPTER_AMOUNT_" .. i] 
		WindowSetShowing("ButtonGuide".. i .."Button", false)
		WindowSetShowing("LabelGuide".. i, false)
		if checkGuide then 
			chkGuide[count+1] = i
			count = count+1
		end
	end
	if count == 0 then
		LabelSetText( "DeathwatchGuides_Label_Header" , V["Guide_Header"] )
		LabelSetText( "DeathwatchGuides_Label_Desc" , towstring(V["Guide_Desc"]) )
	end
	for i=1,count do
		WindowSetShowing("ButtonGuide".. i .."Button", true)
		WindowSetShowing("LabelGuide".. i, true)

		LabelSetText( "LabelGuide" .. i , V["G_GUIDE_".. chkGuide[i] ..""] )
		ButtonSetTextColor("ButtonGuide".. i .."Button",Button.ButtonState.NORMAL, DefaultColor.GREEN.r, DefaultColor.GREEN.g, DefaultColor.GREEN.b)
		ButtonSetText("ButtonGuide".. i .."Button", L"Available")
	end
end

function DeathwatchGuides_ScrollSelectGuide.OnShown()
end

function DeathwatchGuides_ScrollSelectGuide.Shutdown()
end

function DeathwatchGuides_ScrollSelectGuide.Hide()
	WindowSetShowing("DeathwatchGuides_ScrollSelectGuide", false)
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide1Button()
	guide = chkGuide[1]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide2Button()
	guide = chkGuide[2]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide3Button()
	guide = chkGuide[3]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide4Button()
	guide = chkGuide[4]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide5Button()
	guide = chkGuide[5]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide6Button()
	guide = chkGuide[6]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide7Button()
	guide = chkGuide[7]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide8Button()
	guide = chkGuide[8]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide9Button()
	guide = chkGuide[9]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide10Button()
	guide = chkGuide[10]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide11Button()
	guide = chkGuide[11]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide12Button()
	guide = chkGuide[12]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide13Button()
	guide = chkGuide[13]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide14Button()
	guide = chkGuide[14]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide15Button()
	guide = chkGuide[15]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide16Button()
	guide = chkGuide[16]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide17Button()
	guide = chkGuide[17]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide18Button()
	guide = chkGuide[18]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide19Button()
	guide = chkGuide[19]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end

function DeathwatchGuides_ScrollSelectGuide.OnLButtonUpGuide20Button()
	guide = chkGuide[20]
	checkGuide = V["CHAPTER_AMOUNT_" .. guide]
	DeathwatchGuidesWindow.SetGuide(guide)
	DeathwatchGuides_ScrollSelectGuide.Hide()
	DeathwatchGuidesWindow.Show()
	DeathwatchGuides_Hotspot.CheckSelection = 1
end